#-*- coding:utf-8 -*-

# if __name__ == '__main__':
#     print "hello,world"

'''
    此程序执行失败.
'''


def open(filename, mode="rb"):
    import __builtin__
    file = __builtin__.open(filename, mode)
    if file.read(5) not in("GIF87", "GIF89"):
        raise IOError, "not a GIF file"
        file.seek(0)
        return file

fp = open("./sample/sample.jpg")
print len(fp.read()), "bytes"

